package com.czp.infosharingplatformapp.service;

import com.czp.infosharingplatformapp.dto.ResourceResponse;
import com.czp.infosharingplatformapp.model.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface ResourceService {
    Resource saveResource(MultipartFile file, String description, Long categoryId, Long uploaderId) throws IOException;
    Resource findById(Long id);
    List<Resource> searchByFileName(String keyword);
    List<com.czp.infosharingplatformapp.model.Resource> filterByCategory(Long categoryId);
    void deleteResource(Long resourceId);
    ResourceResponse convertToResourceResponse(Resource resource);
    List<Resource> getAllResources();
}